home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / gdb-4.5 / sun4.md / libiberty / Makefile < prev    next >
Encoding:
Makefile  |  1992-06-30  |  5.4 KB  |  190 lines

  1. # This file was generated automatically by configure.  Do not edit.
  2. host_alias = sun4
  3. host_cpu = sparc
  4. host_vendor = sun
  5. host_os = sunos411
  6. target_alias = sun4
  7. target_cpu = sparc
  8. target_vendor = sun
  9. target_os = sunos411
  10. target_makefile_frag = 
  11. host_makefile_frag = 
  12. site_makefile_frag = 
  13. links = alloca-conf.h
  14. VPATH = .
  15. ALL=all.internal
  16. #
  17. # Makefile
  18. #   Copyright (C) 1990, 1991, 1992 Free Software Foundation
  19. #
  20. # This file is free software; you can redistribute it and/or modify
  21. # it under the terms of the GNU General Public License as published by
  22. # the Free Software Foundation; either version 2 of the License, or
  23. # (at your option) any later version.
  24. # This program is distributed in the hope that it will be useful,
  25. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  26. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  27. # GNU General Public License for more details.
  28. # You should have received a copy of the GNU General Public License
  29. # along with this program; if not, write to the Free Software
  30. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  31. #
  32.  
  33. # This file was written, and is maintained by K. Richard Pixley
  34. # <rich@cygnus.com>.
  35.  
  36. #
  37. # Makefile for libiberty directory
  38. #
  39.  
  40. srcdir = .
  41.  
  42. prefix = /usr/local
  43.  
  44. exec_prefix = $(prefix)
  45. bindir = $(exec_prefix)/bin
  46. libdir = $(exec_prefix)/lib
  47.  
  48. datadir = $(prefix)/lib
  49.  
  50. mandir = $(prefix)/man
  51. man1dir = $(mandir)/man1
  52. man2dir = $(mandir)/man2
  53. man3dir = $(mandir)/man3
  54. man4dir = $(mandir)/man4
  55. man5dir = $(mandir)/man5
  56. man6dir = $(mandir)/man6
  57. man7dir = $(mandir)/man7
  58. man8dir = $(mandir)/man8
  59. man9dir = $(mandir)/man9
  60. infodir = $(prefix)/info
  61. includedir = $(prefix)/include
  62. oldincludedir =
  63. docdir = $(datadir)/doc
  64.  
  65. SHELL = /bin/sh
  66.  
  67. INSTALL = install -c
  68. INSTALL_PROGRAM = $(INSTALL)
  69. INSTALL_DATA = $(INSTALL)
  70.  
  71. AR = ar
  72. AR_FLAGS = qv
  73. BISON = bison
  74. MAKEINFO = makeinfo
  75. RANLIB = ranlib
  76.  
  77. TARGETLIB = libiberty.a
  78.  
  79. MINUS_G = -g -O
  80. CFLAGS = $(MINUS_G) -I. -I$(srcdir)/../include $(HDEFINES)
  81.  
  82. # HOST_OFILES contains the list of objects that should be in the
  83. # library (in addition to the REQUIRED_OFILES and EXTRA_OFILES).
  84. # A configuration may override this with a fixed list a object files
  85. # names (hard to maintain), or some other way to generate a list.
  86. HOST_OFILES=`cat needed-list`
  87.  
  88. # Extra targets that the top-level target depends on.
  89. # Specifically, what needs to be made before HOST_OFILES can be used.
  90. # Can be empty if HOST_OFILES is just a list of file names.
  91. DO_ALSO = needed-list
  92.  
  93. # A configuration can specify extra .o files that should be included,
  94. # even if they are in libc. (Perhaps the libc version is buggy.)
  95. EXTRA_OFILES = 
  96.  
  97. all:    $(TARGETLIB)
  98. .PHONY: check
  99. check:
  100.  
  101.  
  102. #### Host, target, and site specific Makefile fragments come in here.
  103. ###
  104.  
  105. # The default target just invokes make recursively.
  106. # However, the automatic configuration (in config/mh_default).
  107. # first causes it to figure out the objects missing in libc.
  108. info install-info clean-info:
  109.  
  110. # NOTE: If you add new files to the library, edit 'functions.def'.
  111. CFILES = basename.c bcmp.c bcopy.c bzero.c getopt.c getopt1.c getpagesize.c \
  112.     getcwd.c index.c insque.c obstack.c rindex.c spaces.c \
  113.     memcmp.c memcpy.c memmove.c memset.c strchr.c strrchr.c \
  114.     strdup.c strerror.c strstr.c strtol.c strtoul.c vfork.c \
  115.     vfprintf.c vprintf.c vsprintf.c sigsetmask.c concat.c fdmatch.c \
  116.     argv.c alloca.c
  117. # These are always included in the library.
  118. REQUIRED_OFILES = basename.o getopt.o getopt1.o obstack.o spaces.o concat.o \
  119.     fdmatch.o argv.o
  120.  
  121. # Do we want/need any config overrides?
  122. #     
  123.  
  124. STAGESTUFF = $(TARGETLIB) *.o
  125.  
  126. install: all
  127.     $(INSTALL_DATA) $(TARGETLIB) $(libdir)/$(TARGETLIB).n
  128.     $(RANLIB) $(libdir)/$(TARGETLIB).n
  129.     mv -f $(libdir)/$(TARGETLIB).n $(libdir)/$(TARGETLIB)
  130.  
  131. # The default configuration adds to libiberty all those functions that are
  132. # missing in libc.  More precisely, it includes whatever $(CC) fails to find.
  133. # Then a sed+awk combination translates the ld error messages into
  134. # a list of .o files.
  135.  
  136. needed-list: $(srcdir)/dummy.c $(EXTRA_OFILES) needed.awk
  137.     $(CC) $(CFLAGS) -c $(srcdir)/dummy.c
  138.     -($(CC) $(LDFLAGS) dummy.o $(EXTRA_OFILES) $(LOADLIBES)) >errors 2>&1 || true
  139.     awk -f needed.awk <errors >needed-list
  140.     -rm -f a.out errors dummy.o
  141.  
  142. # Generate an awk script that looks for functions in functions.def
  143.  
  144. needed.awk: $(srcdir)/functions.def
  145.     echo "# !Automatically generated from $(srcdir)/functions.def"\
  146.       "- DO NOT EDIT!" >needed.awk
  147.     grep '^DEF(' < $(srcdir)/functions.def \
  148.         | sed -e '/DEF/s|DEF.\([^,]*\).*|/\1/ { printf \" \1\.o" }|' \
  149.         >>needed.awk
  150.  
  151. RULE1 = $(TARGETLIB)
  152. $(RULE1): $(REQUIRED_OFILES) $(DO_ALSO) .always.
  153.     $(MAKE) RULE1=not-used RULE2=$(TARGETLIB) \
  154.          HOST_OFILES="$(HOST_OFILES)"\
  155.         "CC=$(CC)" "CFLAGS=$(CFLAGS)" \
  156.         "AR=$(AR)" "AR_FLAGS=$(AR_FLAGS)" "RANLIB=$(RANLIB)"
  157.  
  158. # Rule invoked by recursive make in $(RULE1).
  159. RULE2 = not-used
  160. $(RULE2): $(REQUIRED_OFILES) $(HOST_OFILES) $(EXTRA_OFILES)
  161.     rm -rf $(TARGETLIB)
  162.     $(AR) $(AR_FLAGS) $(TARGETLIB) \
  163.       $(REQUIRED_OFILES) $(HOST_OFILES) $(EXTRA_OFILES)
  164.     $(RANLIB) $(TARGETLIB)
  165.  
  166. .always.:
  167. # Do nothing.
  168.  
  169. .PHONEY: all etags tags ls clean stage1 stage2 .always.
  170.  
  171. etags tags: TAGS
  172.  
  173. TAGS: $(CFILES)
  174.     etags $(HFILES) $(CFILES)
  175.  
  176. ls:
  177.     @echo Makefile $(HFILES) $(CFILES)
  178.  
  179. # Need to deal with profiled libraries, too.
  180.  
  181. clean:
  182.     rm -f *.a *.o core errs *~ \#* TAGS *.E a.out needed.awk errors needed-list
  183.  
  184. force:
  185.  
  186. Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
  187.     $(SHELL) ./config.status
  188.